import 'package:flutter_archer/shared/constants/constants.dart';
import 'package:flutter_archer/shared/services/persistent/persistent.dart';

class UserLocalSource {
  UserLocalSource({required this.persistentor});

  final Persistentor persistentor;

  Future<bool> hasToken() {
    return persistentor.hasKey(CommonConstants.KEY_TOKEN);
  }

  Future<bool> saveToken(String token) {
    return persistentor.setStorage(CommonConstants.KEY_TOKEN,token);
  }
}